package hongcaosp.app.android.video.online.holder;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import hongcaosp.app.android.R;
import hongcaosp.app.android.common.BaseHolder;
import hongcaosp.app.android.video.online.bean.OnlineType;
import xlj.lib.android.base.view.OnRecycleItemClickListener;

public class OnlineTypeHolder extends BaseHolder<OnlineType> {

    private ImageView iv_icon;
    private TextView tv_title;

    public OnlineTypeHolder(View itemView, OnRecycleItemClickListener recycleItemClickListener) {
        super(itemView, recycleItemClickListener);
        iv_icon = itemView.findViewById(R.id.iv_icon);
        tv_title = itemView.findViewById(R.id.tv_title);
    }

    @Override
    public void setData(OnlineType type) {
        iv_icon.setBackgroundResource(type.getIcon());
        tv_title.setText(type.getTitle());
    }
}
